In [1]:
# importing numpy
import numpy as np
In [2]:
x = np.array(10)
In [3]:
x.ndim
Out[3]:
In [4]:
x.shape
Out[4]:
In [5]:
x = np.array([12, 13, 14])
In [6]:
x
Out[6]:
In [7]:
x.ndim
Out[7]:
In [8]:
x.shape
Out[8]:
In [9]:
x = np.array([[1,2,3],
[4,5,6]])
In [10]:
x.ndim
Out[10]:
In [11]:
x.shape
Out[11]:
In [12]:
x = np.array([[[5, 78, 2, 34, 0],
[6, 79, 3, 35, 1],
[7, 80, 4, 36, 2]],
[[5, 78, 2, 34, 0],
[6, 79, 3, 35, 1],
[7, 80, 4, 36, 2]],
[[5, 78, 2, 34, 0],
[6, 79, 3, 35, 1],
[7, 80, 4, 36, 2]]])
In [13]:
x.ndim
Out[13]:
In [14]:
x.shape
Out[14]: